<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.List" %>
<%
    List rows = new ArrayList();
    rows.add(Arrays.asList("/mixed/admin.do", "-", "admin", "admin", ""));
    rows.add(Arrays.asList("/mixed/admin.do", "-", "admin", "employee", null));
    rows.add(Arrays.asList("/mixed/public.do", "-", "-", "-", ""));
    rows.add(Arrays.asList("/inner/admin.do", "admin,employee", "admin", "admin", ""));
    rows.add(Arrays.asList("/inner/employee.do", "admin,employee", "employee", "employee", ""));
    rows.add(Arrays.asList("/inner/anyInner.do", "admin,employee", "-", "employee",  ""));
    rows.add(Arrays.asList("/inner/admin.do", "admin,employee", "admin", "employee", null));
    rows.add(Arrays.asList("/inner/anyInner.do", "admin,employee", "-", "user", null));
%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="/lib/bootstrap/css/bootstrap.css" rel="stylesheet">
    <script src="/lib/jquery-3.4.1.min.js"></script>
    <script src="/lib/bootstrap/js/bootstrap.js"></script>
    <style>
        htmo, body {
            height: 100%
        }
    </style>
</head>
<body class="bg-secondary">
<div class="container h-100 d-flex justify-content-center">
    <div class=" my-auto">
        <table class="table table-hover" style="width: 1000px;">
            <thead class="thead-dark">
            <tr>
                <th>页面</th>
                <th>类权限</th>
                <th>方法权限</th>
                <th>传入账号</th>
                <th>跳转</th>
            </tr>
            </thead>
            <tbody class="bg-white">
            <% for (Object rowObj : rows) {
                List row = (List) rowObj;
            %>
            <tr>
                <td>
                    <%=row.get(0)%>
                </td>
                <td>
                    <%=row.get(1)%>
                </td>
                <td>
                    <%=row.get(2)%>
                </td>
                <td class="align-items-center">
                    <%=row.get(3)%>
                </td>
                <td><a href="<%=row.get(0)%>?username=<%=row.get(3)%>"
                       class="font-weight-bold  <%=row.get(4)!=null?"text-primary":"text-danger"%>">跳转</a>
                </td>
            </tr>
            <%}%>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>
